/*
 * adc.h
 *
 *  Created on: Jun 25, 2013
 *      Author: r.leonov
 */

#ifndef ADC_H_
#define ADC_H_

#include "kl_lib_l15x.h"
#include "stm32l1xx_adc.h"

#define TRESHOLD    1500

class Adc_t {
private:
    bool TresholdState;
    uint32_t Value;
    uint32_t Timer;
public:
    void Init(void);
    void Task(void);
    bool TresholdActive(void) { return TresholdState; }
};

extern Adc_t Adc;
#endif /* ADC_H_ */
